package com.cskaoyan.app.controller;

import com.cskaoyan.app.bean.common.BaseRespVo;
import com.cskaoyan.app.bean.vo.DashBoardDataVO;
import com.cskaoyan.app.service.AdminDashService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AdminDashController {

    @Autowired
    AdminDashService dashService;

    @GetMapping("admin/dashboard")
    public BaseRespVo<DashBoardDataVO> dashBoard() {
        DashBoardDataVO data = dashService.getDashData();
        return BaseRespVo.ok(data);
    }
}
